package com.yami.shop.bean.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品对接
 */
@Data
@TableName("yy_product_docking")
@ApiModel("商品对接")
public class ProductDocking implements Serializable {
    
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @ApiModelProperty("主键ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 商品ID
     */
    @ApiModelProperty("商品ID")
    @NotNull(message = "商品ID不能为空")
    private Long prodId;

    /**
     * 商品分类ID
     */
    @ApiModelProperty("商品分类ID")
    private Long categoryId;

    /**
     * 店铺ID
     */
    @ApiModelProperty("店铺ID")
    @NotNull(message = "店铺ID不能为空")
    private Long shopId;

    /**
     * 对接状态（0-待审核 1-已通过 2-已拒绝）
     */
    @ApiModelProperty("对接状态（0-待审核 1-已通过 2-已拒绝）")
    private Integer dockingStatus;

    /**
     * 拒绝原因
     */
    @ApiModelProperty("拒绝原因")
    private String rejectReason;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 审核时间
     */
    @ApiModelProperty("审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date auditTime;

    /**
     * 非数据库字段
     */
    @TableField(exist = false)
    @ApiModelProperty("商品名称")
    private String prodName;

    @TableField(exist = false)
    @ApiModelProperty("店铺名称")
    private String shopName;

    @TableField(exist = false)
    @ApiModelProperty("店铺对接码")
    private String shopCode;

    @TableField(exist = false)
    @ApiModelProperty("是否需要审核（0-不需要 1-需要）")
    private Integer auditStatus;

    @TableField(exist = false)
    @ApiModelProperty("库存")
    private Integer totalStocks;

    @TableField(exist = false)
    @ApiModelProperty("供货价格")
    private Double proxyFarePrice;
} 